<?php

namespace Modules\Common\Models\Validation;


/**
 *@property int $id
 *@property string $name
 *@property string $path
 *@property string $method
 *@property float $sort
 *@property int $disable
 *@property string $created_at
 *@property string $updated_at
 *@property string $deleted_at
 */
trait AdminPermissionValidation 
{


    public function createRules()
    {
         return [
            'rules' => [
                'name'=>'between:0,32|single_unique:admin_permissions,name',
                'path'=>'between:0,64',
                'method'=>'between:0,6',
                'sort'=>'required',
                'disable'=>'integer',
                
            ],
            'messages' => [
            ],
            'customAttributes' => [
            ]
        ];
    }

    public function updateRules()
    {
         return [
            'rules' => [
                'name'=>'between:0, 32|single_unique:admin_permissions,name',
                'path'=>'between:0, 64',
                'method'=>'between:0, 6',
                'sort'=>'',
                'disable'=>'integer',
                
            ],
            'messages' => [
            ],
            'customAttributes' => [
            ]
        ];
    }


}
